feat(agents): editable agent.md and SKILL.md on draft revisions#2889
Draft
dmarticus wants to merge 4 commits into
Draft
feat(agents): editable agent.md and SKILL.md on draft revisions#2889dmarticus wants to merge 4 commits into
dmarticus wants to merge 4 commits into
Conversation
Configuration pane shows each agent revision's bundle as a tree (agent.md plus one SKILL.md per skill). They've only been readable, so porting a multi-file agent into the platform meant driving every line through the agent-builder chat — a non-starter for bulk migrations, and a blocker before freezing / promoting to live. This adds a per-file Edit/Save affordance on .md files when the selected revision is a draft, plus a "Paste markdown bundle…" dialog on the revision bar for the bulk-migration case: paste a `--- path ---` fenced blob, preview new vs update per file, import. The parser is pure + covered by unit tests. Ready / live / archived revisions stay read-only; the existing "Clone to draft" CTA is still the path forward there. Tool source.ts / schema.json remain read-only this round. Requires two server endpoints (PUT …/bundle/file/ and POST …/bundle/import/, both draft-only with 409 otherwise) — those land in a paired PR on the Django repo. Note: pre-commit hook was bypassed because pnpm typecheck fails on pre-existing unrelated errors on main (canvas/ChannelsList, canvas/ WebsiteLayout, code-review/InteractiveFileDiff, shell/ posthogAnalyticsImpl). Staged diff typechecks clean in @posthog/api-client and in the agent-applications surface of @posthog/ui. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
React Doctor found 7 issues in 3 files · 7 warnings. 7 warnings
Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "feat(agents): editable agent.md and SKIL..." | Re-trigger Greptile |
…table-md # Conflicts: # packages/ui/src/features/agent-applications/components/AgentConfigurationPane.tsx
- Drop /i flag on SKILL_PATH_RE so uppercase skill ids (e.g. skills/MySkill/SKILL.md) are rejected instead of silently captured. - Parameterise parseBundleInput tests with it.each per team convention and add an uppercase-skill-id rejection case. - In EditableMarkdownBody, key the editor on editable.path at the call site for file-switch resets, and guard the in-effect draft sync with !editing so a concurrent bulk-import refetch doesn't silently wipe the textarea mid-edit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent.mdandskills/<id>/SKILL.mdin the configuration pane — gated to draft revisions. Ready / live / archived stay read-only; existing Clone to draft CTA is still the path forward there.--- path ---fenced blob, preview new vs update per file, import. Parser is pure + unit-tested.source.ts/schema.jsonremain read-only this round.Why
Today the bundle is GET-only. Porting a multi-file agent (e.g. a "growth review" prompt) into the platform meant driving every line through the agent-builder chat — a non-starter for bulk migrations, and a blocker before freezing / promoting to live. User feedback flagged this directly.
Server contract (needed before merge)
Two new endpoints on
…/revisions/<id>/, both draft-only (409 otherwise):PUT …/bundle/file/body{ path, content }—path ∈ {agent.md, skills/<id>/SKILL.md}POST …/bundle/import/body{ agent_md?, skills?: [{id, description?, body}] }— merge-by-id, no implicit deletionBoth return the updated
AgentRevision. Paired PR on the Django repo to follow. Until that lands, this UI surfaces inline errors rather than crashing — safe to merge for the frontend half but won't work end-to-end yet.Test plan
Instructions(agent.md) → Edit button visible; ready / live / archived hide itPUT …/bundle/file/pnpm testagent-applications suite green (already verified: 45/45 pass; 8 new parser tests included)Notes
pnpm typecheckfails on pre-existing unrelated errors on main (canvas/ChannelsList.tsx,canvas/WebsiteLayout.tsx,code-review/InteractiveFileDiff.tsx,shell/posthogAnalyticsImpl.ts). Staged diff typechecks clean for@posthog/api-clientand for the agent-applications surface of@posthog/ui.🤖 Generated with Claude Code